<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta name="renderer" content="webkit|ie-comp|ie-stand">
  <title>异步下级</title>
  <link rel="stylesheet" href="static/layui-v2.5.6/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="static/exts/cascader/cascader.css" media="all">
  <style></style>
</head>
<body>
	
	<div class="layui-form-item">
	    <label class="layui-form-label">选择框</label>
	    <div class="layui-input-block">
	        <input type="text" id="cascader" class="layui-input" readonly="readonly">
	    </div>
	</div>
	
<script src="static/layui-v2.5.6/layui/layui.js"></script>
<script>
layui.config({
  base: 'static/exts/cascader'
}).extend({
	cascader: '/cascader'
}).use(['form',"jquery","cascader"], function(){
    var $ = layui.jquery;
    var cascader = layui.cascader;
    var cas = cascader({
        elem: "#cascader",
        url: "http://192.168.26.7/api/cascader",
        type: "get",
        triggerType: "change",
        showLastLevels: true,
        where: {
            a: "aaa"
        },
        value: ["A", "AA1"],
        success: function (data) {
            console.log(data);
        }
    });
    cas.reload({})  // 重载
});
</script>
</body>
</html>